The present invention relates to digital representation, processing, storage and transmission of color images. A digital representation of an image can be stored in a storage device (e.g. a computer memory, a digital video recorder, or some other device). Such representation can be transmitted over a network, and can be used to display the color image on a computer monitor, a television screen, a printer, or some other device. The image can be edited using a suitable computer program. A monochromatic image is also a color image (of a single color displayed possibly at different intensities).
Color is a sensation caused by electromagnetic radiation (light) entering a human eye. The light causing the color sensation is called “color stimulus”. Color depends on the radiant power and spectral composition of the color stimulus, but different stimuli can cause the same color sensation. Therefore, a large number of colors can be reproduced (“matched”) by mixing just three “primary” color stimuli, e.g. a Red, a Blue and a Green. The primary stimuli can be produced by three “primary” light beams which, when mixed and reflected from an ideal diffuse surface, produce a desired color. The color can be represented by its coordinates, which specify the intensities of the primary light beams. For example, in linear RGB color coordinate systems, a color S is represented by coordinates R, G, B which define the intensities of the respective Red, Green and Blue primary light beams needed to match the color S. If P(λ) is the radiance (i.e. the energy per unit of time per unit wavelength) of a light source generating the color S, then the RGB coordinates can be computed as:R=∫0∞P(λ) r(λ)dλG=∫0∞P(λ) g(λ)dλB=∫0∞P(λ) b(λ)dλ  (1)where r(λ), g(λ), b(λ) are “color matching functions” (CMF's). For each fixed wavelength λ, the values r(λ), g(λ), b(λ) are respectively the R, G and B values needed to match color produced by a monochromatic light of the wavelength λ of a unit radiance. The color matching functions are zero outside of the visible range of the λ values, so the integration limits in (1) can be replaced with the limits of the visible range. The integrals in (1) can be replaced with sums if the radiance P(λ) is specified as power at discrete wavelengths. FIG. 1 illustrates the color matching functions for the 1931 CIE RGB color coordinate system for a 2° field. (CIE stands for “Commission Internationale de l'Eclairage”.) See D. Malacara, “Color Vision and Colorimetry: theory and applications” (2002), and Wyszecki & Stiles, “Color Science: concepts and Methods, Quantitative Data and Formulae” (2nd Ed. 2000), both incorporated herein by reference.
The RGB system of FIG. 1 is called linear because, as shown by equations (1), the R, G, and B values are linear in P(λ). In a linear system, the intensities such as R, G, B are called “tristimulus values”.
As seen from FIG. 1, the function r(λ) can be negative, so the R coordinate can be negative. If R is negative, this means that when the color S is mixed with |R| units of the Red primary, the resulting color matches the mixture of G units of the Green primary with B units of the Blue primary.
New linear color coordinate systems can be obtained as non-degenerate linear transformations of other systems. For example, the 1931 CIE XYZ color coordinate system for a 2° field is obtained from the CIE RGB system of FIG. 1 using the following transformation:
                              [                                                    X                                                                    Y                                                                    Z                                              ]                =                              A                          RGB              -              XYZ                                ⁡                      [                                                            R                                                                              G                                                                              B                                                      ]                                              (        2        )                                where        ⁢                  :                                                                              A                      RGB            -            XYZ                          =                              1            0.17697                    ⁡                      [                                                            0.49                                                  0.31                                                  0.20                                                                              0.17697                                                  0.81240                                                  0.01063                                                                              0.00                                                  0.01                                                  0.99                                                      ]                                              (        3        )            This XYZ system does not correspond to real, physical primaries. The color matching functions x(λ), y(λ), z(λ) for this XYZ system are shown in FIG. 2. These color matching functions are defined by the same matrix ARGB-XYZ:
      [                                                      x              _                        ⁡                          (              λ              )                                                                                      y              _                        ⁡                          (              λ              )                                                                                      z              _                        ⁡                          (              λ              )                                            ]    =            A              RGB        -        XYZ              ⁡          [                                                                  r                _                            ⁡                              (                λ                )                                                                                                        g                _                            ⁡                              (                λ                )                                                                                                        b                _                            ⁡                              (                λ                )                                                        ]      The tristimulus values X, Y, Z can be computed from the color matching functions in the usual way:X=∫0∞P(λ) x(λ)dλY=∫0∞P(λ) y(λ)dλZ=∫0∞P(λ) z(λ)dλ  (4)
There are also non-linear color coordinate systems. One example is a non-linear sRGB system standardized by International Electrotechnical Commission (IEC) as IEC 61966-2-1. The sRGB coordinates can be converted to the XYZ coordinates (4) or the CIE ROB coordinates (1). Another example is HSB (Hue, Saturation, Brightness). The HSB system is based on sRGB. In the HSB system, the colors can be visualized as points of a vertical cylinder. The Hue coordinate is an angle on the cylinder's horizontal circular cross section. The pure Red color corresponds to Hue=0°; the pure Green to Hue=120°; the pure Blue to Hue=240°. The angles between 0° and 120° correspond to mixtures of the Red and the Green; the angles between 120° and 240° correspond to mixtures of the Green and the Blue; the angles between 240° and 360° correspond to mixtures of the Red and the Blue. The radial distance from the center indicates the color's Saturation, i.e. the amount of White (White means here that R=G=B). At the circumference, the Saturation is maximal, which means that the White amount is 0 (this means that at least one of the R, G, and B coordinates is 0). At the center, the Saturation is 0 because the center represents the White color (R=G=B). The Brightness is measured along the vertical axis of the cylinder, and is defined as max(R,G,B).
Different color coordinate systems are suitable for different purposes. For example, the sRGB system is convenient for rendering color on certain types of monitors which automatically convert the sRGB coordinates into color. The HSB system is convenient for some color editing operations including brightness adjustments.
Brightness can be thought of as a degree of intensity of a color stimulus. Brightness corresponds to our sensation of an object being “bright” or “dim”. Brightness has been represented as the Y value of the XYZ system of FIG. 2, or as the maximum of the R, G and B coordinates of the sRGB coordinate system.
There is also an xyY coordinate system is defined based on the XYZ system as follows:
the Y coordinate of the xyY system is the same as the Y coordinate of the XYZ system;x=X/(X+Y+Z);z—Z/(X+Y+Z).The values x and z are called chromaticity coordinates. Separate representation of the brightness coordinate and the chromaticity coordinates is helpful in providing a compact yet faithful image representation. People are more sensitive to brightness changes (and hence brightness distortion) than changes in hue and saturation. Therefore, one can represent the chromaticity coordinates less precisely but more compactly (e.g. in a fewer bits) than brightness.
Compact representation is a particular challenge for images with a high dynamic range (the dynamic range is defined as the ratio of the maximum to minimum brightness values, where the minimum brightness is chosen as some positive number). A large range of brightness can be represented compactly using a logarithmic function. See G. W. Larson, “The LogLuv Encoding for Full Gamut, High Dynamic Range Images”, J. Graphics Tools, vol. 3, no. 1, pages 15-31. This article proposes a LogLuv coordinate system with a brightness coordinate Le and chromatic coordinates ue, ve defined as follows:Le=└256(log2Y+64)┘ue=└410u′┘ve=└410v′┘  (5)where:
└exp┘ is the floor operator, denoting the largest integer not exceeding the expression exp;u′=4x/(−2x+12y+3)v′=9y/(−2x+12y+3)
x, y, Y are as in the xyY system.
Le can be stored in 16 bits using sign/magnitude representation, and each of ue, ve in 8 bits.
It is desirable to obtain color coordinate systems which facilitate brightness editing and other types of color editing, and which also allow compact representation of images.